#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define i128 __int128
#define mem(x) memset(x,0,sizeof(x))
#define endl "\n"
#define printYes cout << "Yes\n"
#define printYES cout << "YES\n"
#define printNo cout << "No\n"
#define printNO cout << "NO\n"
#define lowbit(x) ((x)&(-(x)))
#define pb push_back
#define mkp make_pair
#define pii pair<int,int>
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define rep(i,j,k) for (int i=(j);i<=(k);i++)
#define per(i,j,k) for (int i=(j);i>=(k);i--)
#define pcnt(x) __builtin_popcount(x)
mt19937 rnd(time(0));
template<class T>void chkmin(T&x,T y){x=min(x,y);}
template<class T>void chkmax(T&x,T y){x=max(x,y);}

const ll inf=1000000000000000000; 
//const ll inf=1000000000;
//const ll mod=998244353;
const ll mod=1000000007;

const int N=1000005;
ll n,m,p; 
char a[N];
ll ksm(ll x,ll y)
{
	ll res=1;
	while (y)
	{
		if (y&1) res=res*x%mod;
		x=x*x%mod,y>>=1;
	}
	return res;
}
ll calc(ll n,ll s,int i)
{
	ll res=ksm(2,(n-s)*m-1)*(ksm(2,s*m)-ksm(2,s*(m-1-i)))%mod;
	res=res*(ksm(2,i))%mod;
	return res;
}
ll calc(ll n,ll s)
{
	ll ans=0;
	rep(i,0,m-1)
	{
		ll res=ksm(2,(n-s)*m-1)*(ksm(2,s*m)-ksm(2,s*(m-1-i)))%mod;
		res=res*(ksm(2,i))%mod;
		(ans+=res)%=mod;
	}
	return ans;
}
ll calc(ll n)
{
	return calc(n,n/2);
}
ll solve(ll a,ll b,int i)
{
	return calc(a+b,a/2+b/2,i);
}

int main()
{
	freopen("pearl.in","r",stdin);
	freopen("pearl.out","w",stdout);
	ios_base::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin >> n >> m >> p;
	rep(i,0,m-1) cin >> a[i];
	bool flag=1;
	rep(i,0,m-1) if (a[i]=='1') flag=0;
	if (n%2==0&&p%2==1) p=n+1-p;
	bool f=0;
	ll ans=0;
	rep(i,0,m-1)
	{
		if (a[i]=='1') f=1;
		if (f)
		{
			ll res=ksm(2,m*(n-1)-1)*ksm(2,i)%mod;
			if (p%2==1) res=calc(n-1,n/2,i);
			(ans+=res)%=mod;
		}
		else
		{
			ll res=solve(p-1,n-p,i);
			(ans+=res)%=mod;
		}
	}
	(ans+=mod)%=mod;
	cout << ans;
	return 0;
}
